package org.example.product.api;

import org.example.core.utils.R;
import org.example.product.api.domain.WareSku;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author 小杰_cc
 * @version 1.0
 */
@FeignClient("warehouse-service")
public interface WareHouseService {
    @PostMapping("/wms/backend/wareSku/saves")
    R<?> saves(@RequestBody List<WareSku> wareSku);

    @GetMapping("/wms/backend/wareSku/stock/{skuId}")
    R<Boolean> isStock(@PathVariable("skuId") Long skuId);

    @GetMapping("/wms/front/sku/stock/{skuId}")
    R<Integer> queryStock(@PathVariable("skuId") Long skuId);
}
